// Whitemice.MOGI.RPC2.Annotation
// License: LGPL
// Copyright: Whitemice Consulting, 2006
// Author(s): Adam Tauno Williams (awilliam@whitemice.org)
using System;
using System.Collections;
using Whitemice.MOGI;
using CookComputing.XmlRpc;

namespace Whitemice.MOGI.RPC2
{
	/// \brief Implments the IAnnotation interface
	public abstract class Annotation : Document, IAnnotation
	{
		/// \brief Constructor
		/// \param document An XmlRpcStruct of an existing annotation
		/// \param server	Reference to the server object
		public Annotation(XmlRpcStruct document, Whitemice.MOGI.RPC2.Server server) 
			: base(document, server)
		{
			server.Log.Debug("Annotation(XmlRpcStruct, RPC2.server");
		}
		
		/// \brief Constructor for NEW annoations
		/// \param documentId The MOGI document id of the document being annotated
		/// \param server	Reference to the server object
		public Annotation(string documentId, Whitemice.MOGI.RPC2.Server server) 
			: base(documentId, server)
		{
			server.Log.Debug("Annotation(string, RPC2.server");
			this.documentId = documentId;
		}
		
		/// \brief Returns and updates the text of the annotation
		public abstract string Comment { get; set; }
		
		/// \brief Returns the data of an existing annotation
		public abstract DateTime Date { get; }
		
		/// \brief Returns the document Id the annotation is applied to
		public string Document
		{
			get { return documentId; }
		}
	}
}